﻿using System;
namespace ApiBetaSeries.Services
{
    public interface IUserServices
    {
        /// <summary>
        /// Add a show to the member
        /// </summary>
        /// <param name="token">token of the member</param>
        /// <param name="urlSerie">the show</param>
        void AddShowInUser(string token, ApiBetaSeries.IShow show);
        /// <summary>
        /// Add a show to the member
        /// </summary>
        /// <param name="token">token of the member</param>
        /// <param name="urlSerie">url of the show</param>
        void AddShowInUser(string token, string urlSerie);
        /// <summary>
        /// remove a show from a member
        /// </summary>
        /// <param name="token">token of the member</param>
        /// <param name="urlSerie">the show</param>
        void DelShowInUser(string token, ApiBetaSeries.IShow show);
        /// <summary>
        /// remove a show from a member
        /// </summary>
        /// <param name="token">token of the member</param>
        /// <param name="urlSerie">url of the show</param>
        void DelShowInUser(string token, string urlSerie);


        /// <summary>
        /// Destroy a token
        /// Disconnect a member
        /// </summary>
        /// <param name="token">token to destroy</param>
        void DestroyToken(string token);

        /// <summary>
        /// allow to know if a token is still active
        /// </summary>
        /// <param name="token">token to test</param>
        /// <returns>if the token is active</returns>
        bool IsActiveToken(string token);

        /// <summary>
        /// Auth an user by login and password
        /// </summary>
        /// <param name="username">login to log in</param>
        /// <param name="password">password to log in</param>
        /// <returns>the token</returns>
        string Auth(string username, string password);

        /// <summary>
        /// Auth an user by login and password
        /// </summary>
        /// <param name="username">login to log in</param>
        /// <param name="password">password to log in</param>
        /// <returns>an usern</returns>
        IUser AuthUser(string username, string password);

        /// <summary>
        /// Get all the info of an identified member
        /// </summary>
        /// <param name="token">token of the member</param>
        /// <returns>The user information</returns>
        IUser GetInfos(string token);

        /// <summary>
        /// get infos of a member
        /// </summary>
        /// <param name="username">username of the member</param>
        /// <returns>info of the member</returns>
        IUser GetInfosOfMember(string username);

        /// <summary>
        /// Get the username of all the friend of the member
        /// </summary>
        /// <param name="token">token of an identified member</param>
        /// <returns></returns>
        System.Collections.Generic.List<string> GetFriends(string token);

        /// <summary>
        /// Get the username of all the friend of the member
        /// </summary>
        /// <param name="username">username of the member</param>
        /// <returns></returns>
        System.Collections.Generic.List<string> GetFriendsOfMember(string username);
    }
}
